#ifndef ___fat32_subtransaccion01_obtener_conexion

#define ___fat32_subtransaccion01_obtener_conexion 1

#include "f32_mto.c"

#include "f32_opAA.c"
#include "f32_opAB.c"

unsigned char fat32st_obtener_conexion (unsigned char, unsigned int, unsigned int *, unsigned char, void *);

unsigned char fat32st_obtener_conexion (unsigned char estado, unsigned int transaccion, unsigned int * conexion, unsigned char estadoOp,
                                                                                                                         void * datosOp) {
  if (!conexion) return 0;
  switch (estado) {
  case 0:
    fat32_crear_operacion(transaccion, &fat32op_solicitar_conexion, NULL, 0);
    return 1;
  case 1:
    fat32_quitar_operacion(transaccion);
    if (estadoOp == 1) {
      *conexion = *((unsigned int *) datosOp);
      free(datosOp);
      return 0;
    }
    fat32_crear_operacion(transaccion, &fat32op_obtener_conexion_solicitada, NULL, 0);
    return 2:
  case 2:
    fat32_quitar_operacion(transaccion);
    *conexion = *((unsigned int *) datosOp);
    free(datosOp);
    return 0;
  default:
    return 0;
  }
}

#endif